@if(count($list))
    @foreach($list as $item =>$value)
        <div class="item">
            @if($route=='ranking' && $item<10 && ((isset($_GET['page']) && $_GET['page']==1 )||(!isset($_GET['page']))))
                <span class="rank-number">{{$item+1}}</span>
            @endif
            <div class="copys">
                <div class="photo" style="width: 155px;height: 220px"><img
                            src="{{all_image_url(json_decode($value->copywritingimage)->first)}}"
                            alt="{{$value->goodstitle}}"></div>
                @if($value->userid<10000)
                    <div class="descr">{!! writing_show($value->copywriting) !!}</div>
                @else
                    <div class="descr">{{$value->goodstitle}}<br/>【原价{{$value->origprice}} 元】券后【{{$value->voucherprice}}
                        元】<br/>领券：{{$value->couponlink}}<br/>抢购：{{$value->goodslink}}
                        <br/>{!! writing_show($value->copywriting) !!}</div>
                @endif
            </div>
            <div class="mask showmore">
                <div class="cover">
                    <a href="{{$value->goodslink}}" target="_blank"><img
                                src="{{all_image_url(json_decode($value->coverimage)->main)}}"
                                alt="{{$value->goodstitle}}"></a>
                    @if($route=='mark')
                        <div class="timers" data-date="{{$value->begintime}}">
                            <b class="d">0</b>天<b class="h">0</b>小时<b class="m">0</b>分<b class="s">0</b>秒后开始
                        </div>
                    @else
                        <div class="btns">
                            <span>加入选品</span><span class="doCopy">点击复制</span>
                        </div>
                    @endif
                </div>
                <div class="content">
                    @if($route=='ranking')
                        @if($search['oid']==1)
                            <h3 class="rank-sale">近1小时售出<span>{{$value->onehoursales}}</span>件</h3>
                        @elseif($search['oid']==2)
                            <h3 class="rank-sale">近2小时售出<span>{{$value->twohoursales}}</span>件</h3>
                        @elseif($search['oid']==3)
                            <h3 class="rank-sale">近一天售出<span>{{$value->todaysales}}</span>件</h3>
                        @endif

                    @endif
                    <div class="title" data-title="{{$value->goodstitle}}">{{$value->goodstitle}}</div>
                    <div class="line">
                        <div style="width:{{$value->coupontotal==0?0:ceil((intval($value->coupontotal-$value->couponremain)/$value->coupontotal*100))}}%"></div>
                    </div>
                    <div class="sales">
                        <div>券后<span>￥<b>{{$value->voucherprice}}</b></span></div>
                        <p>
                            月销：{{$value->monthsales}}
                        </p>

                    </div>
                    <div class="fee">佣金：@if($value->commissiontype==1)通用@elseif($value->commissiontype==2)
                            定向@elseif($value->commissiontype==3)鹊桥@elseif($value->commissiontype==4)营销@endif
                        <b>{{$value->commissionrate}}%</b>
                    </div>
                    <div class="coupon">
                        <div onclick="window.open('{{$value->couponlink}}')" style="cursor:pointer">
                            <span>{{(int)$value->couponmoney}}元</span>
                        </div>
                        <p>
                        <span>@if($value->shoptype==2)<img src="/assets/images/icon-tmall.png" alt="tmall">
                            @elseif($value->shoptype==1)<img src="/assets/images/taobao.png" alt="taobao">
                            @endif</span>
                            <span>@if($value->activitytype==2)<img src="/assets/images/icon-qiang.png" alt="tmall">
                                @elseif($value->activitytype==1)<img src="/assets/images/ju.png" alt="juhuasuan">
                                @endif</span>
                        </p>

                    </div>
                    <div class="find_good_id" style="display: none">{{$value->id}}</div>
                    <div class="find_good_type" style="display: none">{{$value->goodstype}}</div>
                </div>
                <div class="extras">
                    <div class="row">
                        <span>推广销量增涨：<b>{{$value->increment}}</b></span>
                        <a href="#" class="error"><i>!</i> 商品纠错</a>
                    </div>
                    <div class="row">
                        <span>优惠券剩余：<b>{{$value->couponremain}}</b>/{{$value->coupontotal}}</span>
                    </div>
                    <div class="row">
                        <span>店铺：{{$value->shopname}}</span>
                    </div>
                    <div class="row">
                        <span>放单人：<a target="_blank" href="{{route('userhome',['userid'=>$value->userid])}}"
                                     style="color: #999; ">{{$value->username}}</a></span>
                        <span>{{timeCalculation($value->created_at)}}</span>
                    </div>
                </div>
            </div>
        </div>
    @endforeach
@else
    @include('lay.noData')
@endif